import React, {Component, PropTypes} from "react";
import {Router, Route, IndexRoute, browserHistory, Link} from "react-router";
require('../../../../less/home.less');
var Stores = require('../store');
var Actions = require('../action');
var Settings = require('../setting');

var InputSearch = require('../../common/formElementGroup/inputSearch');
var Carousel = require('../../common/carousel/carousel');
var BottomNav = require('../../common/bottomNav/bottomNav');
var Advert = require('../../common/advert/advert');


var Home = React.createClass({
    getInitialState: function () {
        return {}
    },

    componentWillMount: function () {
        Actions.common('GET_HOMEMODULE');
    },

    componentDidMount: function () {
    },

    componentWillUnmount: function () {
    },

    render: function(){
        var carouselList = [
            {url: '../../../../images/img/ad2.png'},
            {url: '../../../../images/img/ad1.png'},
            {url: '../../../../images/img/ad3.png'},
            {url: '../../../../images/img/ad4.png'},
        ];

        return (
            <div className="home-box">
                <InputSearch placeHolder="潮流T恤" />
                <Carousel  items={carouselList} dots={true} arrows={false} delay={3} autoplay={true}/>

                <nav className="home-nav">
                    <Link to=""><img src="../../../../images/sprites/tag.png" alt=""/>优选{this.state.a}</Link>
                    <Link to=""><img src="../../../../images/sprites/gift.png" alt=""/>礼包</Link>
                    <Link to=""><img src="../../../../images/sprites/ticket.png" alt=""/>卡券</Link>
                    <Link to=""><img src="../../../../images/sprites/hit.png" alt=""/>专题</Link>
                </nav>

                <Advert />

                <BottomNav/>
            </div>
        )
    }
});


export default Home;